package com.base.hong.ui.login.viewmodel

import androidx.lifecycle.MutableLiveData
import com.base.hong.model.LoginEntity
import com.base.hong.repository.ZLRepository
import com.htt.base_library.base.BaseVModel

/**
 *
 *Create by Hong on 2023/3/11 09:34.
 *
 */
class LoginViewModel : BaseVModel() {
    val mLoginData: MutableLiveData<LoginEntity> = MutableLiveData()
    val repository: ZLRepository by lazy { ZLRepository() }

    fun getLogin(username: String, password: String) {
        launch({
            repository.sendLoginInfo(username, password)
        }, { bean ->
            mLoginData.value = bean.data
        }
        )

    }


}